package com.atguigu.crowd.mapper;

import com.atguigu.crowd.entity.Member;
import com.atguigu.crowd.entity.Project;
import com.atguigu.crowd.entity.ProjectExample;
import com.atguigu.crowd.entity.ProjectManger;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectMapper {
    int countByExample(ProjectExample example);

    int deleteByExample(ProjectExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Project record);

    int insertSelective(Project record);

    List<Project> selectByExample(ProjectExample example);

    Project selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Project record, @Param("example") ProjectExample example);

    int updateByExample(@Param("record") Project record, @Param("example") ProjectExample example);

    int updateByPrimaryKeySelective(Project record);

    int updateByPrimaryKey(Project record);

    List<Project> selectProjectByKeyword(String keyword);

    //审核后 对项目流程进行管理 获取项目信息
    List<Project> selectProjectByKeywordForProjectManger(String keyword);

    void updatePassByProjectId(Integer projectId);
    void updateNotPassByProjectId(Integer projectId);

    int getCountManger();

    ProjectManger getNumProjectByManger(Integer mangerId);

    void updateProjectForManger(@Param("projectId")Integer projectId,@Param("mangerName")String mangerName);

    void updateMangerCount(@Param("mangerId")int mangerId,@Param("count")int count);

    void updateProjectDeploy(@Param("projectId")Integer projectId, @Param("deploydate")String deploydate,@Param("developmentStartDate")String developmentStartDate);

    void updateProjectStatus(@Param("selectVal")Integer selectVal, @Param("projectId")int projectId);
}